/* GUI CONVERTED from icsiiq.p (converter v1.76) Mon Apr  8 13:50:06 2002 */
/* icsiiq.p - SITE INQUIRY                                                    */
/* Copyright 1986-2002 QAD Inc., Carpinteria, CA, USA.                        */
/* All rights reserved worldwide.  This is an unpublished work.               */
/* $Revision: 1.12 $                                                          */
/*V8:ConvertMode=Report                                                       */
/* REVISION: 6.0          LAST EDIT: 02/07/90   MODIFIED BY: EMB              */
/* REVISION: 6.0          LAST EDIT: 09/03/91   BY: afs *D847*                */
/* Revision: 7.3          Last edit: 11/19/92   By: jcd *G339*                */
/*           7.3                     09/10/94   BY: bcm *GM02*                */
/*           7.3                     03/15/95   by: str *F0N1*                */
/* REVISION: 8.6          LAST EDIT: 03/09/98   BY: *K1KX* Beena Mol          */
/* REVISION: 8.6          LAST EDIT: 05/20/98   BY: *K1Q4* Alfred Tan         */
/* REVISION: 8.6          LAST EDIT: 06/02/98   BY: *K1RQ* A.Shobha           */
/* REVISION: 9.0          LAST EDIT: 03/10/99   BY: *M0B8* Hemanth Ebenezer   */
/* REVISION: 9.0          LAST EDIT: 03/13/99   BY: *M0BD* Alfred Tan         */
/* REVISION: 9.1      LAST MODIFIED: 03/24/00   BY: *N08T* Annasaheb Rahane   */
/* REVISION: 9.1      LAST MODIFIED: 08/13/00   BY: *N0KS* Mark Brown         */
/* Old ECO marker removed, but no ECO header exists *F0PN*                    */
/* $Revision: 1.12 $    BY: Jean Miller          DATE: 04/06/02  ECO: *P056*  */
/******************************************************************************/
/* All patch markers and commented out code have been removed from the source */
/* code below. For all future modifications to this file, any code which is   */
/* no longer required should be deleted and no in-line patch markers should   */
/* be added.  The ECO marker should only be included in the Revision History. */
/******************************************************************************/

/* DISPLAY TITLE */

/*GUI preprocessor directive settings */
&SCOPED-DEFINE PP_GUI_CONVERT_MODE REPORT

{mfdtitle.i "b+ "}

DEFINE VARIABLE dptdesc LIKE dpt_desc.
/*GUI preprocessor Frame A define */
&SCOPED-DEFINE PP_FRAME_NAME A

FORM /*GUI*/ 
   
 RECT-FRAME       AT ROW 1 COLUMN 1.25
 RECT-FRAME-LABEL AT ROW 1 COLUMN 3 NO-LABEL VIEW-AS TEXT SIZE-PIXELS 1 BY 1
 SKIP(.1)  /*GUI*/
space(1)
   si_site
   si_desc
with frame a side-labels width 80 attr-space NO-BOX THREE-D /*GUI*/.

 DEFINE VARIABLE F-a-title AS CHARACTER INITIAL "".
 RECT-FRAME-LABEL:SCREEN-VALUE in frame a = F-a-title.
 RECT-FRAME-LABEL:HIDDEN in frame a = yes.
 RECT-FRAME:HEIGHT-PIXELS in frame a =
  FRAME a:HEIGHT-PIXELS - RECT-FRAME:Y in frame a - 2.
 RECT-FRAME:WIDTH-CHARS IN FRAME a = FRAME a:WIDTH-CHARS - .5.  /*GUI*/

/*GUI preprocessor Frame A undefine */
&UNDEFINE PP_FRAME_NAME



/* SET EXTERNAL LABELS */
setFrameLabels(frame a:handle).

{wbrp01.i}

repeat:

   if c-application-mode <> 'web' then
      prompt-for si_site with frame a
   editing:

      if frame-field = "si_site" then do:

         /* FIND NEXT/PREVIOUS RECORD */
         {mfnp.i si_mstr si_site si_site si_site si_site si_site}

         if recno <> ? then display si_site si_desc with frame a.
         recno = ?.
      end.
      else do:
         status input.
         readkey.
         apply lastkey.
      end.
   end.
   status input.

   {wbrp06.i &command = prompt-for &fields = "  si_site" &frm = "a"}

   if (c-application-mode <> 'web') or
      (c-application-mode = 'web' and
      (c-web-request begins 'data'))
   then do:

      find si_mstr where si_site = input si_site no-lock no-error.
      if available si_mstr then
         display si_desc with frame a.
      else
         display "" @ si_desc with frame a.

      hide frame b.

   end.

   /* OUTPUT DESTINATION SELECTION */
   {gpselout.i &printType = "terminal"
               &printWidth = 80
               &pagedFlag = " "
               &stream = " "
               &appendToFile = " "
               &streamedOutputToTerminal = " "
               &withBatchOption = "no"
               &displayStatementType = 1
               &withCancelMessage = "yes"
               &pageBottomMargin = 6
               &withEmail = "yes"
               &withWinprint = "yes"
               &defineVariables = "yes"}
/*GUI*/ RECT-FRAME:HEIGHT-PIXELS in frame a = FRAME a:HEIGHT-PIXELS - RECT-FRAME:Y in frame a - 2.


   for each si_mstr where si_site >= input si_site
   no-lock with frame b width 80 no-attr-space down:

      /* SET EXTERNAL LABELS */
      setFrameLabels(frame b:handle).

      
/*GUI*/ {mfguichk.i } /*Replace mfrpchk*/
        ASSIGN dptdesc = "".
        FOR FIRST dpt_mstr NO-LOCK WHERE dpt_dept = si__chr01.
            ASSIGN dptdesc = dpt_desc.
        END.

      display
         si_site
         si_desc
         si_entity
         si_status
         si_auto_loc
         si_db si__chr01 dptdesc
         
    WITH WIDTH 200 STREAM-IO /*GUI*/ .

   end.

   {mfreset.i}
/*GUI*/ {mfgrptrm.i} /*Report-to-Window*/

   {pxmsg.i &MSGNUM=8 &ERRORLEVEL=1}

end.

{wbrp04.i &frame-spec = a}
